{{define "form"}}
<form class="layui-form model-form" action="">
    <input name="id" id="id" type="hidden" value="{{.info.Id}}">
    <div class="layui-form-item">
        <label class="layui-form-label">文章封面：</label>
        {{upload_image "cover|封面|90x90|建议上传尺寸450x450" .info.Cover "" 0}}
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">文章标题：</label>
            <div class="layui-input-block">
                <input name="title" value="{{.info.Title}}" lay-verify="required" autocomplete="off" placeholder="请输入文章标题"
                       class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">文章标签：</label>
            <div class="layui-input-block">
                <input name="tags" value="{{.info.Tags}}" lay-verify="required" autocomplete="off" placeholder="请输入文章标签"
                       class="layui-input" type="text">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">所属栏目：</label>
        {{item .info.ItemId .info.CateId 2}}
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">作者：</label>
            <div class="layui-input-block">
                <input name="author" value="{{.info.Author}}" lay-verify="required" autocomplete="off" placeholder="请输入作者"
                       class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">是否置顶：</label>
            <div class="layui-input-block">
                {{switch "isTop" "已置顶|未置顶" .info.IsTop}}
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">点击量：</label>
            <div class="layui-input-block">
                <input name="viewNum" value="{{.info.ViewNum}}" lay-verify="required|number" autocomplete="off"
                       placeholder="请输入点击量" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">状态：</label>
            <div class="layui-input-block">
                {{switch "status" "显示|隐藏" .info.Status}}
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">来源名称：</label>
            <div class="layui-input-block">
                <input name="sourceName" value="{{.info.SourceName}}" lay-verify="required" autocomplete="off"
                       placeholder="请输入来源名称" class="layui-input" type="text">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">来源链接：</label>
            <div class="layui-input-block">
                <input name="sourceUrl" value="{{.info.SourceUrl}}" lay-verify="required" autocomplete="off"
                       placeholder="请输入来源链接" class="layui-input" type="text">
            </div>
        </div>
    </div>
    <div class="layui-form-item layui-form-text" style="width:595px;">
        <label class="layui-form-label">文章导读：</label>
        <div class="layui-input-block">
            <textarea name="guide" placeholder="请输入备注" class="layui-textarea">{{.info.Guide}}</textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">文章图集：</label>
        <div class="layui-input-block">
            {{album "imgs|图集|90x90|20|建议上传尺寸450x450" .info.ImgList "jpg|png|gif|bmp|jpeg" 0}}
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">文章内容：</label>
        <div class="layui-input-block">
            <textarea name="content" id="content" lay-verify="required" class="layui-textarea">{{.info.Content}}</textarea>
            {{kindeditor "content" "default" "80%" 350}}
        </div>
    </div>
    {{submit "submit|立即保存,close|关闭" 1 ""}}
</form>
{{end}}